/**
 * Created by IntelliJ IDEA.
 * User: zm
 * Date: 2023/3/18
 */
public class Demo5 {
    public static int CommonDivisor(int nums1, int nums2){
        while(nums1 - nums2 != 0){
            if(nums1 < nums2){
                int temp = nums1;
                nums1 = nums2;
                nums2 = temp;
            }
            nums1 = nums1 - nums2;
        }
        return nums1;
    }
    public static void main(String[] args) {
        int a = 10;
        int b = 12;
        System.out.println(CommonDivisor(25,15));
    }
}
